var _envUrls = {
    dev : "/nffund/nfEStationWechat", //开发环境
    stg : "/nffund/nfEStationWechat", //测试环境
    preprd : getPrdPath()+"/nffund/nfEStationWechat", //准生产
    prd : getPrdPath()+"/nffund/nfEStationWechat" //生产环境
}

//设置ajax超时时间
var timeout = 20000;

//首页广告图片地址
var adPicUrl = 'https://wap.southernfund.com/nffund/main/ad/';

//当前服务端环境(dev:开发，stg:测试,preprd:准生产，prd:生产)
var serverIp = _envUrls["prd"];

if(serverIp != _envUrls["stg"]){
    var curWwwPath=window.document.location.href;
    if(curWwwPath.indexOf(".com")>-1){
        serverIp = _envUrls["stg"];
    }
}
var _envcheckmsg = "";
var piwikUrl = "https://wap.southernfund.com:8008/";//piwik生产环境
if(serverIp.indexOf("https://wap.southernfund.com") > -1){
   _envcheckmsg = "";// 生产环境
}else if(serverIp.indexOf("https://wap.southernfund.com:8044") > -1){
    _envcheckmsg = "准生产环境";
}else{
    _envcheckmsg = "测试环境";  
}


var SUCCESS_FLAG = "ETS-5BP0000";
var Time_OUT ='ETS-5BP9951';
var CKEY_USERINFO ='userInfo';
var CKEY_DEVICEINFO = 'deviceInfo';
var PWD_ERROR1 = 'DS-TR050102';
var PWD_ERROR2 = 'ETS-9B118';
var PWD_ERROR3 = "DS-TR3Q0102";
var RISK_EXPIRE = 'ETS-5BP0010';
var LOGIN_3_ERROR='WA-LBC001';
var RELOGIN_TIMES = 0;//连续重新登录不超过3次
var superXjbCode = '000719';
var paramInterface = {
    home:{'function':'NF038'},
    funds:{'function':'NF017'}
}

function getPrdPath(){//获取生产环境路径
       var curWwwPath=window.document.location.href;
        if(curWwwPath.indexOf("https://wap.southernfund.com:8044")>-1){
            return "https://wap.southernfund.com:8044"
        }
        else if(curWwwPath.indexOf("https://wap.southernfund.com")>-1){
            return "https://wap.southernfund.com";
        }else{
            return "https://m.nffund.com";
        } 
        
    }

function getRootPath(){//用于获取图片验证码路径
     var verImgSrc  = serverIp;
     verImgSrc = verImgSrc.replace(/\/nffund\/nfEStationWechat/g, "");
     return verImgSrc;
 }

var COUPONTITLE = '购基<span class="tc-ff0" style="font-size:1.6em;">0</span>折起';

var setSiteId = "7";// 6:微信站点 7：wap站点
if(sessionStorage.getItem("weixinid")){
    setSiteId = "6";
}
var enableHeartBeatTimer = 30;// 更精准记录客户在页面停留的时间，默认聚焦时，每30秒上报一次

var  xieyiUrl = "https://wap.southernfund.com";
//快捷支付协议地址
var kjzf_xyUrl=xieyiUrl+'/xieyi.html?comefrom=app';
//新快捷支付协议地址
var kjzf_xyUrl_fast=xieyiUrl+'/xieyi/xieyi_fast.html?comefrom=app';
//浦东发展银行快捷支付协议
var kjzf_xyUrl_pf=xieyiUrl+'/xieyi/xieyi_pf.html?comefrom=app';
//华夏银行快捷支付协议
var kjzf_xyUrl_hx=xieyiUrl+'/xieyi/xieyi_hx.html?comefrom=app';
//招商银行快捷支付协议
var kjzf_xyUrl_zs=xieyiUrl+'/xieyi/xieyi_zs.html?comefrom=app';

var  etrade_xyUrl = xieyiUrl+'/xieyi_etrade.html?comefrom=app';
var  redeem_xyUrl = xieyiUrl+'/xieyi_redeem.html?comefrom=app';
var  register_xyUrl = xieyiUrl+'/xieyi_register.html?comefrom=app';
var   discount_xyUrl =  xieyiUrl+'/agreement/discount_xieyi.html?comefrom=app';
var   mby_xyUrl =  xieyiUrl+'/agreement/mby_agree.html?comefrom=app';
var   superRedeem_xyUrl =  xieyiUrl+'/agreement/superRedeem_xieyi.html?comefrom=app';
var   eInvestment_xyUrl =  xieyiUrl+'/cleverInvest/eInvestment_xieyi.html?comefrom=app';
var   investment_xyUrl =  xieyiUrl+'/investment_xieyi.html?comefrom=app';
var   comb_xyUrl =  xieyiUrl+'/combinvest/comb_xieyi.html?comefrom=app';
var   eInvestment_tipUrl =  xieyiUrl+'/cleverInvest/riskPrompt.html?comefrom=app';
var   sign_xieyiUrl =  xieyiUrl+'/pension/pension_xieyi.html?comefrom=app';
var   pension_xieyiUrl =  xieyiUrl+'/agreement/pension_xieyi.html?comefrom=app';